/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package batchjob;

/**
 *
 * @author jonesbr
 */
public class Annuity extends Customer implements IMonthlyItem {
    private int paymentAmount;

    @Override
    public void process(String data) {
        // split the string into its constituent parts.
        String[] annuityInfo = data.split(" ");
        setFirstName(annuityInfo[0]);
        setLastName(annuityInfo[1]);
        String strPaymentAmount = annuityInfo[2];
        setPaymentAmount(Integer.parseInt(strPaymentAmount));
    }

    @Override
    public String toString() {
        return "Annuity " + getFirstName() + " " + getLastName() + " Payment AMount: "  + getPaymentAmount();
    }

    /**
     * @return the paymentAmount
     */
    public int getPaymentAmount() {
        return paymentAmount;
    }

    /**
     * @param paymentAmount the paymentAmount to set
     */
    public void setPaymentAmount(int paymentAmount) {
        this.paymentAmount = paymentAmount;
    }
    
    
    
}
